/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/
package com.nurdrobotics;

import edu.wpi.first.wpilibj.*;

/**
 *
 */
public class Shooter {

    private static SpeedController m_jaguarPitch = null;
    private static SpeedController m_jaguarYaw = null;

    /*
     * This function initializes variables in this class. It should
     * be called exactly once prior to using the class.
     */
    public static boolean init() {
        m_jaguarPitch = Motor.getInstance(Motor.ID_SHOOTER_PITCH);
        m_jaguarYaw = Motor.getInstance(Motor.ID_SHOOTER_YAW);
        if ((m_jaguarPitch == null) || (m_jaguarYaw == null)) {
            Dashboard.setShooterStatus("ERR");
            return false;
        }
        return true;
    }

    /**
     * This function is called continuously while in teleoperated mode
     */
    public static void teleopUpdate() {
        m_jaguarPitch.set(ShooterStick.getPitchValue());
        m_jaguarYaw.set(ShooterStick.getYawValue());
    }
}
